package michaelgame.collision;

import michaelgame.sprite.LifeTracker;
import framework.Collision;
import framework.Sprite;


/**
 * Collision class for managing collisions between Player and Bullets
 * 
 * @author Michael Deng
 * 
 */
public class BossBullet extends Collision {

    private final String mySprite1 = "Player";
    private final String mySprite2 = "Bullet";

    @Override
    public void action (Sprite a, Sprite b) {
        // a = Player, b = Bullet
        getMyLevel().markSpriteToDelete(b, "Bullet");
        ((LifeTracker) getMyLevel().getMySprites().get("LifeTracker").get(0)).subtractLife();
    }

    @Override
    public void update () {
        super.findAndHandleCollisions(mySprite1, mySprite2);
    }

}
